import config from "@/config"
import http from "@/utils/request"

// 分页获取兵种信息
export const getArmsKindInfo = {
    url: `${config.BASE_URL}/publicDate/SoldierInformation/select`,
    name: "分页获取应征人员",
    get: async function (param) {
        return await http.get(this.url + `?pageNum=${param.pageNum}&pageSize=${param.pageSize}`)
    }
}

// 新增兵种信息
export const addArmsKindInfo = {
    url: `${config.BASE_URL}/publicDate/SoldierInformation/install`,
    name: "新增兵种信息",
    post: async function(data) {
        return await http.post(this.url,data)
    }
}

// 根据id查询兵种信息

// 修改兵种信息
export const updateArmsKindInfo = {
    url: `${config.BASE_URL}/publicDate/SoldierInformation/update`,
    name: "修改兵种信息",
    put: async function(data) {
        return await http.put(this.url+`?soldier_info_id=${data.id}`,data.soldierInfo)
    }
}